<?php
		//@目前(2011-11-28)我能掌握的驗證電子郵件格式的寫法。
		$fm_doComment = new Application_Form_doComment();
		$this->view->fm_doComment = $fm_doComment;
		if ($this->_request->isPost())
		{
	    	$formData = $this->_request->getPost();

			if(TRUE === $fm_doComment->email->isValid($formData['email']))
			{
				echo 'Email format passed!!!';
     		}
     		else
     		{
     			$fm_doComment->populate($formData);

				$ary_emailErrMsgs = $fm_doComment->email->getErrors();
				if(TRUE === in_array('isEmpty', $ary_emailErrMsgs))
					echo  '空的' . '<br>';
						
				if(TRUE === in_array('emailAddressInvalidFormat', $ary_emailErrMsgs)
				|| TRUE === in_array('emailAddressInvalidHostname', $ary_emailErrMsgs)
				|| TRUE === in_array('hostnameUnknownTld', $ary_emailErrMsgs)
				|| TRUE === in_array('hostnameLocalNameNotAllowed', $ary_emailErrMsgs)
				|| TRUE === in_array('hostnameInvalidHostname', $ary_emailErrMsgs))
					echo '格式不正確';
			}
	    }